(function ($app) {
    $app.module('gtPartyApp').controller('leaderAssessDetailCtrl', function ($scope, $http, $modal, $ocLazyLoad, $alert, $loading, $state, $bsRouterState, AuthUser, $timeout, $excel, $partySelect, $filter) {
        $scope.editParams = $bsRouterState.$params($scope);
        $scope.dataModel = {};

        $scope.reqFileModel = {
            selectdata: {FileRefID: '', pageindex: 1, pagesize: 10, ptotal: 0},//查询参数：FileRefID为文件关联ID
            filetype: 71,//文件类型
            items: [],//列表数据地址
            readonly: true,//是否只能查看
            title: '相关文件',
            addFileButton: '上传'
        };

        $scope.getData = function () {
            $http
            ({
                method: 'get', url: "../../api/leaderWork/leaderassess/get",
                params: {
                    'id': $scope.editParams.id
                }
            }).then(function (result) {
                $scope.dataModel = result.data.item;
                $scope.reqFileModel.selectdata.FileRefID = $scope.dataModel.id;
            }, function (resp) {
                $scope.showMsg('错误', '服务器错误：' + resp.data);
            });
        };

        $scope.getData();

        $scope.pagechange = function () {
            $bsRouterState.$closeTab($scope);
        };
    });
})(angular);